<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../css/fresh_flower.css">
    <link rel="stylesheet" href="../css/common.css">
    <title>Document</title>
</head>
<body>
<div class="big_box">
    <!--头部导航开始-->
    <header >
        <div class="header">
            <div class="left_jt">
                <a href="">
                    <img src="../img/箭头左.png"/>
                </a>
            </div>
            <div class="logo">
                <b>鲜花列表</b>
            </div>
            <div class="Category">
                <a class="my-account">
                    <img src="../img/分类.png"/>
                </a>
            </div>
        </div>
    </header>

    <!--分类导航样式 默认隐藏-->
    <div class="new-tbl-type" id="CMenu" >
        <a class="new-tbl-cell" href="index.html">
            <img class="icon1" src="../img/detail/首页.png"/>
            <br>
            首页
        </a>
        <a class="new-tbl-cell" href="category.html">
            <img class="icon2" src="../img/detail/分类.png"/>
            <br>
            分类搜索
        </a>
        <a class="new-tbl-cell" href="">
            <img src="../img/detail/购物车.png"/>
            <br>
            购物车
        </a>
        <a class="new-tbl-cell" href="login.html">
            <img src="../img/detail/我的.png"/>
            <br>
            我的
        </a>
    </div>

    <!--综合 销量 价格 -->
    <div class="all">
        <ul>
            <li>综合</li>
            <li>销量</li>
            <li>价格</li>
        </ul>
    </div>

    <!--鲜花展示-->
    <div class="fresh">

    </div>
</div>
<script src="../js/jquery-3.1.1.js"></script>
<script src="../js/common.js"></script>
<script>
    $(function () {
        //        鲜花展示
        var params = {};
        params.keyword = '鲜花';
        $.get('../php/lunbo.php',params,function(data){
            var strhtl='';
            for (var i = 0; i<data.length; i++) {
                var id = encodeURIComponent(data[i].id);
                strhtl +='<a href="detail.html?id='+id+'">' +
                        '<img src="'+data[i].Img+'" height="240" width="220"/>' +
                        '<br>'+data[i].name+'<br> ' +
                        '<p class="price">￥'+data[i].price+'</p>' +
                        ' </a>';
            }
            $('.fresh').append(strhtl);

        });
    })
</script>
</body>
</html>